﻿/// <reference path="~/admin/UI/code/_intelisense.js" />

(function ($) {

    //多语言
    Utils.setText($('html'));

    //Logo
    if (Config_Configs.Admin.Logo) {
        var img = new Image();
        $(img).load(function () {
            $(this).prependTo(elements.logo);
        }).error(function () {
        }).attr('src', Config_Configs.Admin.Logo);
    }

    //退出及帮助按钮
    $('#smenu_logout').attr('href', Conf.Files.Logout);
    $('#smenu_help').attr('href', Conf.Files.Help);


    //左侧导航栏
    var lMenu = {
        "items": [
            { "href": "/admin/Remote/seo/menu.html", "text": "搜索优化", "icon": "medal_gold_1" }
        ]
    };
    var menus = UI.Accordion(lMenu);
    elements.frame.left.append(menus);

    hrefClickFns.push(function ($this) {
        var href = $this.attr('href');
        var target = $this.attr('target');

        if (!target && href && href.length >= 1 && href.indexOf('#') != 0 && href.indexOf('javascript:') != 0) {
            Views.Page.Load(href); //            loadPage(href);
            return true;
        }
    });

    //我的桌面
    Views.Page.Load(Conf.Paths.Admin + 'html/home/');

})(jQuery);